1. Field of the Invention
The present invention relates generally to the manipulation of raster images, and more particularly to removing isolated objects from raster images.
2. Related Art
It is often desirable in image editing to remove objects from an image. Once the object is removed, however, it can be difficult to fill in the background left by the removed object and make the image look as if the object had never been there.
Several software packages make it possible to remove, at least somewhat, an object from an image. For example, MicroStation Descartes, available from Bentley Systems Inc., is an image display and editing application that provides two different tools for raster object removal. The first is a remove speckle tool that is used to remove objects within an image that fall within a user selectable radius and in a selected range of colors. The main limitation of the remove speckle tool is that it replaces the object with a uniform color. If the background is not a uniform color, the replacement creates a visible seam, i.e., a noticeable transition from the background to the replacement area, usually on either side of a line. Therefore, uniform color replacement creates a seamless replacement only for images with a uniform background (such as maps, engineering plans, etc). The second is a copy/paste tool that is used to copy a portion of an image to another location within the same image. The copy/paste tool removes an object from the image by pasting another part of the image over the object to be removed. However, since the tool requires the user to first copy an area, then to paste it onto the area to be removed, it requires a lot of trial and error effort before finding the best possible match that creates seamless removal of the object. Further, even at best it is not always able to create a seamless removal.
Corel Photo-Paint, an image editing application developed by Corel Corporation, has a clone tool that lets a user copy an image region onto another image region. The clone tool allows the removal of a portion of an image by replacing the removed region with a clone of another region. The clone tool is disadvantageous because it requires the user first to select the area to be cloned and then select the area where the cloned area is pasted, forcing the user to “guess” in advance what part of the image could best replace the region to be removed. The use of the clone tool for removing objects involves a lot of trial and error effort, especially when trying to minimize the seam between the original image and the replaced portion.
Adobe PhotoShop, an image editing application developed by Adobe Systems Inc., has a tool similar to the Corel clone tool, called clone stamp. The clone stamp tool operates in a similar manner to the clone tool and has the same limitations. Like the clone tool of Corel Photo-Paint, the clone stamp tool cannot be used easily to remove objects while minimizing the seam.
Once the object is removed from the image, one solution for minimizing the seam left by the removal is a feathering tool, such as the ones provided in Adobe PhotoShop and Corel Photo-Paint. Feathering is well known to those of ordinary skill in the art. In feathering, a user defines a feathering area around a “fence” in the image. The fence typically corresponds to the seam left by the replacement. Then, whatever process is applied to the pixels inside the fence is also applied in the feathering area. Within the feathering area, the intensity of the process is faded out from the fence to the outer part of the feathering area. In this way, the seam between the replaced object and the remaining image can be smoothed out.
The problem with using current feathering tools is that the user must manually set a value for the width of the feathering area. Having a larger feathering area generally produces a smoother seam, however, if the feathering area is too large, image elements may be feathered that should not have been feathered. When that occurs, the user must perform the feathering process again with a different value for the width of the feathering area until a satisfactory result is achieved. This process can take a long time and involve a lot of trial and error.
What is needed then is an improved method of removing objects from raster images that overcomes the shortcomings of conventional solutions.